﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
using System.IO;
using System.Web.Security;
using System.Text.RegularExpressions;

namespace System.Security
{
    /// <summary>
    /// System.Security
    /// </summary>
    public class Encrypt
    {
        /// <summary>
        /// Md5
        /// </summary>
        /// <param name="value">Value</param>
        /// <returns>Return value</returns>
        public static String MD5(String value)
        {
            return FormsAuthentication.HashPasswordForStoringInConfigFile(value, "MD5");
        }

        /// <summary>
        /// sha256 value
        /// </summary>
        /// <param name="value">value</param>
        /// <returns>return value</returns>
        public static String SHA1(String value)
        {
            return FormsAuthentication.HashPasswordForStoringInConfigFile(value, "SHA1");
        }
    }
}
